﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" EnableEventValidation="false"
    AutoEventWireup="true" CodeFile="Video.aspx.cs" Inherits="Admin_Video" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label runat="server" ID="lblTitle" Font-Bold="true" ForeColor="#006C52"></asp:Label><br />
    <br />
    <asp:GridView Width="100%" ID="gvVideo" runat="server" AutoGenerateColumns="False"
        BorderColor="#DFDFDF" BorderStyle="None" BorderWidth="1px" AllowPaging="false"
        ForeColor="Black" GridLines="Vertical" OnRowCancelingEdit="gvVideo_RowCancelingEdit"
        OnRowEditing="gvVideo_RowEditing" ShowFooter="True" OnRowUpdating="gvVideo_RowUpdating"
        OnRowDeleting="gvVideo_RowDeleting">
        <FooterStyle BackColor="#CCCC99" />
        <RowStyle BackColor="#EFEFEF" VerticalAlign="Middle" />
        <AlternatingRowStyle BackColor="#FEFEFE" VerticalAlign="Middle" />
        <EmptyDataTemplate>
            <table width="100%" style="border: 1px; border-color: #DFDFDF">
                <tr style="background-color: #808080">
                    <td align="center" style="color: White; font-weight: bold;">
                        Действие
                    </td>
                    <td align="center" style="color: White; font-weight: bold;">
                        Заголовок на русском
                    </td>
                    <td align="center" style="color: White; font-weight: bold;">
                        Заголовок на иврите
                    </td>
                    <td align="center" style="color: White; font-weight: bold;">
                        Ссылка
                    </td>
                </tr>
                <tr style="background-color: #CCCC99">
                    <td>
                        <asp:LinkButton ID="lbAddNew" runat="server" CausesValidation="False" CommandName="Create"
                            Text="добавить" OnClick="lbAddNew_Click"></asp:LinkButton>
                    </td>
                    <td>
                        <asp:TextBox ID="txtDescRu" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        <asp:TextBox ID="txtDescHeb" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        <asp:TextBox ID="txtLink" runat="server"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <Columns>
            <asp:TemplateField HeaderText="Заголовок на русском">
                <EditItemTemplate>
                    <asp:TextBox ID="txtDescRu" Width="95%" runat="server" Text='<%# Eval("descriptionRu") %>'></asp:TextBox>
                    <asp:Label ID="lblID" runat="server" Visible="false" Text='<%# Eval("ID")%>'></asp:Label>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblID" runat="server" Visible="false" Text='<%# Eval("ID")%>'></asp:Label>
                    <asp:Label ID="lblDescRu" runat="server" Text='<%# Eval("descriptionRu")%>'></asp:Label>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtDescRu" runat="server"></asp:TextBox>
                </FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Заголовок на иврите">
                <EditItemTemplate>
                    <asp:TextBox ID="txtDescHeb" Width="95%" runat="server" Text='<%# Eval("descriptionHeb") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblDescHeb" runat="server" Text='<%# Eval("descriptionHeb")%>'></asp:Label>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtDescHeb" runat="server"></asp:TextBox>
                </FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Ссылка">
                <EditItemTemplate>
                    <asp:TextBox ID="txtLink" Width="95%" runat="server" Text='<%# Eval("Link") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblLink" runat="server" Text='<%# Eval("Link")%>'></asp:Label>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtLink" runat="server"></asp:TextBox>
                </FooterTemplate>
            </asp:TemplateField>
             <asp:TemplateField HeaderText="Действие" ShowHeader="False">
                <EditItemTemplate>
                         <asp:ImageButton runat="server" ID="imgSave"
                            AlternateText="Сохранить" ToolTip="Сохранить" ImageUrl="~/Admin/images/save.png"
                            CommandName="Update" />
                          <asp:ImageButton runat="server" ID="imgCancel"
                            AlternateText="Отмена" ToolTip="Отмена" ImageUrl="~/Admin/images/delete.png"
                            CommandName="Cancel" />
                </EditItemTemplate>
                <ItemTemplate>
                    <asp <asp:ImageButton runat="server" ID="imgUpdate" AlternateText="Edit" 
                         ToolTip="Редактировать" ImageUrl="~/Admin/images/edit.png"
                            CommandName="Edit" />
                         <asp:ImageButton runat="server" ID="imgDelete"
                            AlternateText="Delete" ToolTip="Удалить" ImageUrl="~/Admin/images/delete.png"
                            CommandName="Delete" />
                </ItemTemplate>
                <FooterTemplate>
                    <asp:Button ID="lbAddNew" runat="server" CausesValidation="False" CommandName="Create"
                        Text="добавить" OnClick="lbAddNew_Click"></asp:Button>
                </FooterTemplate>
            </asp:TemplateField>
        </Columns>
        <PagerStyle ForeColor="Black" HorizontalAlign="Right" BackColor="#EFEFEF" />
        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="Gray" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="#DFDFDF" />
    </asp:GridView>
</asp:Content>
